import React, { PropTypes, Component } from 'react';
import { Router, Route, IndexRoute, browserHistory, Link } from 'react-router';

/**
 * 搜索框
 * 
 * @class search
 * @extends {Component} 
 */

class Search extends Component {
    constructor(props) {
        super(props);
        console.log(this);
        this.aa = function () {
            this.context.router.go("search");
        }
    }

    render() {
        return (
            <header className="mui-bar mui-bar-nav service-header">
                <a className="mui-icon mui-icon-left-nav mui-pull-left header__link mui-hidden"></a>
                <div className="mui-title header__serch">
                    <i className="serch__icon serch__icon__png"></i>
                    <Link to="/search">
                        <input className="serch__input" type="text" readOnly="readonly" autoComplete="off" placeholder="搜索公众号" />
                    </Link>
                </div>
            </header>
        );
    }
    componentDidMount() {
    }
}

Search.contextTypes = {
    router: React.PropTypes.object.isRequired
}

export default Search